﻿using SportsPlatform.BaseModels;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SportsPlatform.Model.SportBusiness
{
    /// <summary>
    /// 报名信息表实体
    /// </summary>
    [Table("T_B_RegistrationInfo")]
    public class RegistrationInfo : BaseModel
    {
        /// <summary>
        /// 参赛人姓名
        /// </summary>
        [Required]
        [MaxLength(20)]
        public string CompeteName { get; set; }

        /// <summary>
        /// 参赛人联系电话
        /// </summary>
        [Required]
        [MaxLength(20)]
        public string CompeteTel { get; set; }

        /// <summary>
        /// 参赛团队表Id
        /// </summary>
        public Guid? CompeteTeamId { get; set; }

        /// <summary>
        /// 参赛人身份证号码
        /// </summary>
        [Required]
        [MaxLength(20)]
        public string CompeteIdNo { get; set; }

        /// <summary>
        /// 感应器号码
        /// </summary>
        [Required]
        [MaxLength(100)]
        public string SensorNumber { get; set; }

        /// <summary>
        /// 参赛队名
        /// </summary>
        [Required]
        [MaxLength(50)]
        public string CompeteTeamName { get; set; }

        /// <summary>
        /// 赛事表Id
        /// </summary>
        public Guid CompetitionId { get; set; }

        /// <summary>
        /// 赛事项目表Id
        /// </summary>
        public Guid CompetitionProjectId { get; set; }

        /// <summary>
        /// 报名提交时间
        /// </summary>
        public DateTime RegistrationSubmissionTime { get; set; }

        /// <summary>
        /// 提交用户Id
        /// </summary>
        public Guid EmployeeId { get; set; }

        /// <summary>
        /// 项目费用
        /// </summary>
        public decimal Money { get; set; }

        /// <summary>
        /// 关联订单号Id
        /// </summary>
        public Guid PaymentOrderId { get; set; }

        /// <summary>
        /// 报名来源（1：小程序；2：H5；3：线下报名）
        /// </summary>
        public int RegistrationSource { get; set; }

        /// <summary>
        /// 报名状态 1：待审核，2：报名成功，3：报名失败
        /// </summary>
        public int RegistrationStatus { get; set; }

        /// <summary>
        /// 审核备注
        /// </summary>
        [Column(TypeName = "text")]
        public string ReviewComments { get; set; }

        /// <summary>
        /// 审核时间
        /// </summary>
        public DateTime? AuditTime { get; set; }

        /// <summary>
        /// 审核人Id
        /// </summary>
        public Guid? ReviewedUserId { get; set; }

        /// <summary>
        /// 报名序号
        /// 个人赛每个项目的报名用户需要保存，团队赛则不需要
        /// </summary>
        public int SerialNum { get; set; }
    }

}